//
//  CustomProgressHUD.m
//  liangyi
//
//  Created by 张水 on 16/12/13.
//  Copyright © 2016年 yswh. All rights reserved.
//

#import "CustomProgressHUD.h"
#import "SVProgressHUD.h"

@implementation CustomProgressHUD

+(void)load{
    
    static dispatch_once_t progress_onceToken;
    dispatch_once(&progress_onceToken, ^{
        
        [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
        [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
        [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
        [SVProgressHUD setBackgroundColor:[UIColor ColorWithHex:@"#71C0CF"]];
        [SVProgressHUD setMinimumDismissTimeInterval:2];
        
    });
}

+(void)showSuccessWithStatus:(NSString *)status{
    [SVProgressHUD  showSuccessWithStatus:status];
}

+(void)showErrorWithStatus:(NSString *)status{
    [SVProgressHUD showErrorWithStatus:status];
}

+(void)showProgress{
    [SVProgressHUD showProgress: -1 ];
}

+(void)dismisProgress{
    
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
    
}

@end
